package mao.leetcode.others;

import java.util.Arrays;
import java.util.Comparator;

public class xx {
    public static void main(String[] args) {
        int[][] a = {{1,2},{3,4}};
        Arrays.sort(a,(o1, o2) ->
                o1[0]==o2[0]?o1[0]-o2[0]:o1[1]-o2[1]
        );
        System.out.println(a);
        for(int [] b:a){
            System.out.println(b[0]);
        }

    }
}
